<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/custom.form.css">
    <style>
        .layui-table-cell {
            padding: 0 4px;
            height: auto;
            overflow: visible;
            text-overflow: inherit;
            white-space: normal;
            word-break: break-all;
            text-align: center;
        }

        .layui-table-box {
            overflow: visible;
        }

        .layui-table-box {
            overflow: visible;
        }

        .layui-table-header {
            overflow: visible;
        }

        .layui-table-box {
            overflow: visible;
        }

        .layui-table-main {
            overflow: visible;
        }
    </style>
</head>
<body>
<div>
    <!--    <div id="searchParam">-->
    <!--        <div class="layui-form-item">-->
    <!--            <div class="layui-input-inline">-->
    <!--                <input type="text" readonly class="layui-input" id="statisticsYear" placeholder="年份">-->
    <!--            </div>-->
    <!--            <div class="layui-input-inline layui-form">-->
    <!--                <select id="statisticsMonth">-->
    <!--                    <option value="0">全年</option>-->
    <!--                    <option value="-01-31">一月</option>-->
    <!--                    <option value="-02-28">二月</option>-->
    <!--                    <option value="-03-31">三月</option>-->
    <!--                    <option value="-04-30">四月</option>-->
    <!--                    <option value="-05-31">五月</option>-->
    <!--                    <option value="-06-30">六月</option>-->
    <!--                    <option value="-07-31">七月</option>-->
    <!--                    <option value="-08-31">八月</option>-->
    <!--                    <option value="-09-30">九月</option>-->
    <!--                    <option value="-10-31">十月</option>-->
    <!--                    <option value="-11-30">十一月</option>-->
    <!--                    <option value="-12-31">十二月</option>-->
    <!--                </select>-->
    <!--            </div>-->
    <!--            <div class="layui-input-inline ">-->
    <!--                <button class="layui-btn" onclick="search()" id="search">统计</button>-->
    <!--            </div>-->
    <!--        </div>-->

    <!--    </div>-->
    <!--    <table class="layui-hide" id="jcjf_table" lay-filter="jcjf_table"></table>-->
    <table id="jcjf_table" lay-filter="jcjf_table"></table>
</div>
</body>
<script src="/layui/layui.all.js"></script>
<script src="/js/core.util.js"></script>
<script th:inline="none">
    //获取token
    var token = CoreUtil.getData("access_token");
    //地址栏转义token中的#号
    var tokenQuery = token.replace("#", "%23");
    var tableIns1;
    var table = layui.table;
    var form = layui.form;
    var layer = layui.layer;
    var $ = jQuery = layui.jquery;
    var laydate = layui.laydate;
    var tree = layui.tree;
    var startTime = null;
    var endTime = null;

    var currentDate = new Date();
    var currentYear = currentDate.getFullYear();
    var endYear = currentYear + 4;
    layui.config({
        base: '/'
    }).extend({
        eleTree: 'layui-ext/eleTree/eleTree',
        tableMerge: 'layui-ext/tableMerge/tableMerge'
    }).use(['table', 'laypage', 'layer', 'laydate', 'tree', 'eleTree', 'tableMerge'], function () {
        tableIns1 = table.render({
            elem: '#jcjf_table'
            , contentType: 'application/json'
            , headers: {"authorization": token}
            , where: {statisticsYear: currentYear, statisticsMonth: '0'}
            , url: '/caseAjxxRelation/ajmxbList' //数据接口
            , method: 'POST'
            , page: true
            , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据
                return {
                    "code": res.code, //解析接口状态
                    "msg": res.msg, //解析提示文本
                    "count": CoreUtil.isEmpty(res.data) ? 0 : res.data.total, //解析数据长度
                    "data": CoreUtil.isEmpty(res.data) ? null : res.data.records //解析数据列表
                }
            }
            , cols: [
                [
                    // {type: 'checkbox', fixed: 'left'},
                    {type: 'numbers', title: '序号', align: 'center', rowspan: 2}, // 序号列
                    {field: 'ajbh', title: '案件编号', align: 'center', rowspan: 2},
                    {field: 'shxydm', title: '社会信用代码', align: 'center', rowspan: 2},
                    // {field: 'nsrsbh',title: '纳税人识别号',align:'center',rowspan:2},
                    {field: 'larq', title: '立案日期', align: 'center', rowspan: 2},
                    {field: 'hy', title: '行业', align: 'center', rowspan: 2},
                    {field: 'jaqlqszhj', title: '积案清理前所在环节', align: 'center', rowspan: 2},
                    {field: 'ajlx', title: '案件类型', align: 'center', rowspan: 2},

                    {title: '案件清理情况', align: 'center', colspan: 4},

                    {title: '查补收入情况(万元)', align: 'center', colspan: 4},
                    {title: '税款入库情况(万元)', align: 'center', colspan: 4},

                    {field: 'currajzt', title: '当前案件状态', align: 'center', rowspan: 2},
                    {field: 'swjgmc', title: '所属单位', align: 'center', rowspan: 2}
                ],
                [
                    {field: 'csjacy', title: '初始积案成因', align: 'center'}
                    , {field: 'sfqlwb', title: '是否清理完毕', align: 'center'}
                    , {field: 'clyj', title: '清理方式或未清理完毕原因及处理意见', align: 'center'}
                    , {field: 'jaszhj', title: '积案所在环节', align: 'center'},

                    {field: 'cbsk', title: '税款', align: 'center'}
                    , {field: 'cbznj', title: '滞纳金', align: 'center'}
                    , {field: 'cbfk', title: '罚款', align: 'center'}
                    , {field: 'cbxj', title: '小计', align: 'center'},

                    {field: 'rksk', title: '税款', align: 'center'}
                    , {field: 'rkznj', title: '滞纳金', align: 'center'}
                    , {field: 'rkfk', title: '罚款', align: 'center'}
                    , {field: 'rkxj', title: '小计', align: 'center'}
                ]
            ], toolbar: '#toolbar'
            , done: function (res, curr, count) {
                // tableMerge.render(this)
            }
        });
    });

    //执行查询
    function search() {
        //这里以搜索为例
        tableIns1.reload({
            where: { //设定异步数据接口的额外参数，任意设
                statisticsYear: $("#statisticsYear").val(),
                statisticsMonth: $("#statisticsMonth").val(),
            }
        });
    }
</script>
</html>